package com.sc.nft.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sc.nft.entity.RedPacketRule;
import com.sc.nft.entity.vo.AdminRedPacketRuleFindPageVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface RedPacketRuleMapper extends BaseMapper<RedPacketRule> {

    Page<AdminRedPacketRuleFindPageVO> findPage(Page page);


    Integer overlapping(@Param("collectionId") Long collectionId, @Param("type")Integer type, @Param("min")Integer min,@Param("max") Integer max);
    Integer overlappingUpdate(@Param("collectionId") Long collectionId, @Param("type")Integer type, @Param("min")Integer min,@Param("max") Integer max,@Param("id")Long id);
}
